1. Field of the Invention
The present invention pertains to the field of personal computer systems. More particularly, this invention relates to protected mode simulation of a real mode interrupt based application programming interface in a personal computer system.
2. Art Background
Certain types of prior personal computer systems employ central processing units that conform to the Intel Microprocessor Architecture. Newer generations of the Intel Microprocessor Architecture provide a central processing unit that operates in a variety of modes including a real mode and a protected mode. The real mode and the protected mode are software controllable by an operating system executed by the central processing unit.
The real mode of the central processing unit provides an address space of one megabyte. The protected mode supports a full thirty-two bit programming model and provides thirty-two bit internal registers and addressing modes. The protected mode also provides on chip paged memory management functions.
One type of prior art operating system is MS-DOS from Microsoft Corporation of Redmond, Wash. The MS-DOS operating system executes in the real mode of the central processing unit.
Device driver programs under the MS-DOS operating system are typically implemented as interrupt driven resident manager programs. A typical resident manager program under the MS-DOS operating system functions as a terminate and stay resident (TSR) program. A typical DOS TSR resident manager provides a set of functions that enable access to hardware devices of the personal computer system by application programs under the MS-DOS operating system.
An application program under the MS-DOS operating system typically communicates with a DOS TSR resident manager by performing a real mode software interrupt according to a predefined application programming interface, defined by the resident manager. The real mode software interrupt transfers control to the DOS TSR resident manager. The DOS TSR resident manager typically performs a function specified by the application program, and then returns control back to the application program. Thereafter, the DOS TSR resident manager remains installed in system memory.
An operating system that executes in the protected mode can support application programs originally developed for the MS-DOS operating system if the operating system conforms to a DOS protected mode interface (DPMI) specification. The DPMI specification allows programs to access the advanced features of Intel Microprocessor Architecture in a well-behaved, hardware independent fashion that does not compromise system protection. An operating system that provides such DPMI system services is called a DPMI host. Applications that access DPMI services are called DPMI clients.
One type of prior art operating system that provides such DPMI services is the Microsoft Windows operating system. The Microsoft Windows operating system executes in the protected mode of the Intel Microprocessor Architecture central processing unit. The Microsoft Windows operating system executes on top of the MS-DOS operation system, and supplies the DPMI services necessary for simulating real mode functions of the MS-DOS operating system.
Microsoft Windows application programs commonly access the services of the DOS TSR resident managers to access hardware devices of the computer system. Such application programs typically perform real mode software interrupts to access the function services of the DOS TSR resident managers. Microsoft Windows provides DPMI services to simulate the real mode software interrupts and access the DOS TSR resident managers.
Unfortunately, the MS-DOS TSR resident managers are executed in the real mode of the central processing unit and must be loaded in system memory below the one megabyte boundary. As a consequence, the TSR resident managers take up the limited available space below one megabyte in system memory, thereby limiting the availability of system memory for launching new application programs.
In addition, such real mode execution of the DOS TSR resident managers does not take advantage of the system security mechanisms provided by the protected mode of the Intel Microprocessor Architecture. As a consequence, Microsoft Windows applications programs that employ DOS TSR resident managers are much more vulnerable to system crashes than are application programs that use protected mode device drivers.